<!DOCTYPE html>
<meta charset=utf-8>
<title>File's lastModified</title>
<link rel=help href="https://w3c.github.io/FileAPI/#dfn-lastModified">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
"use strict";

async_test(t => {
  const curTime = Date.now();
  const file = new File([], "dummy");

  t.step_timeout(() => {
    assert_true(
      Math.abs(curTime - file.lastModified) < 200,
      "lastModified should be generated at File construction if not provided"
    );
    t.done();
  }, 400);
});
</script>
